//
//  HMTryReadViewModel.m
//  HowToDo
//
//  Created by 宋轩 on 17/1/6.
//  Copyright © 2017年 KY. All rights reserved.
//

#import "HMTryReadViewModel.h"
#import <YYModel.h>

@implementation HMTryReadViewModel

+(void)getTryReadModelWithID:(NSNumber *)tid Finished:(void (^)(NSArray *))finishedBlock Failed:(void (^)(NSError *))failedBlock
{
    [[HMNetWorkTool sharedTool] requestTryReadJsonDataWithID:tid Finished:^(id responseObject) {
        
        NSDictionary *dic = responseObject;
        
        NSArray *jsonArr = dic[@"data"];
        
        NSArray *newList = [NSArray yy_modelArrayWithClass:[HMTryReadModel class] json:jsonArr];
        
        finishedBlock(newList);
        
    } Failed:^(NSError *error) {
        failedBlock(error);
    }];
}

@end
